﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Validater;

namespace COFE.Core
{
    /// <summary>
    /// {121-130} A list of properties for EventLog.
    /// </summary>
    public enum EventLogProperties
    {
        /// <summary>
        /// Id of the event.
        /// </summary>
        [PropertyType(typeof(Int64))]              
        Id = 121,
        /// <summary>
        /// The time when the event is recorded.
        /// </summary>
        [PropertyType(typeof(DateTime))]
        [Metadata(true)]
        [Alias("Time")]
        Time,
        /// <summary>
        /// The sender identifier, usually it's class name.
        /// </summary>
        [PropertyType(typeof(string))]        
        Sender,
        /// <summary>
        /// The current user name when the event is recorded.
        /// </summary>
        [PropertyType(typeof(string))]        
        UserId,
        /// <summary>
        /// Message of the event, obtained from the eventargs's ToString() method.
        /// </summary>
        [PropertyType(typeof(string))]
        [Metadata(true)]
        [Alias("Message")]
        Message,
        /// <summary>
        /// The actual event, including FileSystemEventArgsExA and WorkEventArgs.
        /// </summary>
        [PropertyType(typeof(EventArgs))]        
        Event,

        /// <summary>
        /// Type of event, this is implemented by FSEventPP or WorkEventPP.
        /// FSEventPP : ChangeType.ToString(), ChangeType is ModifiedAc
        /// </summary>
        [PropertyType(typeof(string), typeof(ModifiedAction))]
        [Metadata(false)]
        [Alias("Type")]
        EventType,


        #region File System Event 
        /// <summary>
        /// Whether is the modified item is file or folder.
        /// </summary>
        [PropertyType(typeof(bool))]
        [Metadata(false)]
        [Alias("IsFolder")]
        IsFolder,

        /// <summary>
        /// Full parse path (include volume) of the file/folder changed.
        /// </summary>
        [PropertyType(typeof(string))]
        [Metadata(false)]
        [Alias("Path")]
        FullParseName,

        /// <summary>
        /// Original full parse path (include volume) of the file/folder changed.
        /// </summary>
        [PropertyType(typeof(string))]
        [Metadata(false)]
        [Alias("OldPath")]
        OriginalParseName

        #endregion

    }
}
